<?php
Yii::app()->clientScript->registerCssFile($baseUrl.'/css/login_new.css');
$this->pageTitle=Yii::app()->name . ' - 登录';
?>
<div id="login">
    <h1><a href="javascript:void(0);">LOGO</a></h1>
    <?php $form = $this->beginWidget('CActiveForm', array(
            'id'=>'login-form',
            //'enableClientValidation'=>true,
            'enableAjaxValidation'=>true,
            'clientOptions'=>array(
                'validateOnSubmit'=>true,
            ),
        )
    ); ?>
    <?php echo $form->label($user_login,'username'); ?>
    <label for="username">
        <?php echo $form->error($user_login,'username'); ?>
        <br>
        <?php echo $form->textField($user_login,'username',array('class'=>'inpu')); ?>
    </label>


    <?php echo $form->label($user_login,'password'); ?>
    <label for="user_pass">
        <?php echo $form->error($user_login,'password'); ?>
        <br>
        <?php echo $form->passwordField($user_login,'password',array('class'=>'inpu')); ?>
    </label>

    <?php
    //$type是否为1 :
    $type=1;
    if($type ==1):
        //检测是否开启了图像库
        if(CCaptcha::checkRequirements()): ?>
            <?php echo $form->label($user_login,'verifyCode'); ?>
            <label for="user_check">
                <?php echo $form->error($user_login,'verifyCode'); ?>
                <br>
                <?php echo $form->textField($user_login,'verifyCode',array('class'=>'chk')); ?>
            </label>
            <span class="code" id="code" >
			<?php $this->widget('CCaptcha',array('showRefreshButton'=>false,'clickableImage'=>true,'imageOptions'=>array('alt'=>'点击换图','title'=>'点击换图','style'=>'cursor:pointer'))); ?>
		</span>
        <?php endif;
    endif;
    ?>
    <p>
        <input type="submit" class="login_btn"  name="send"   value="登&nbsp;&nbsp;录"/>
    </p>
    <p class="footer">CopyRight 2015 悠游周末  UUZHOUMO </p>
    <?php $this->endWidget(); ?>

</div>